﻿using System;
using System.Runtime.Serialization;

namespace NCMIS.ObjectModel.MetaData
{
    /// <summary>
    /// Represents a list of instances of <see cref="NCMIS.ObjectModel.MetaData.TypeDefinition"/>.
    /// </summary>
    [DataContract(Namespace = CmisNs.Cmism)]
    public class TypeDefinitionList
    {
        /// <summary>
        /// The collection of <see cref="NCMIS.ObjectModel.MetaData.TypeDefinition"/> objects.
        /// </summary>
        [DataMember(Name = "types")]
        public TypeDefinition[] Types
        {
            get;
            set;
        }

        /// <summary>
        /// True if the Repository contains additional items after those contained in the response, 
        /// false otherwise. If true, a request with a larger skipCount or larger maxItems is expected
        /// to return additional results (unless the contents of the repository has changed).
        /// </summary>
        [DataMember(Name = "hasMoreItems")]
        public bool HasMoreItems
        {
            get;
            set;
        }

        /// <summary>
        /// If the repository knows the total number of items in a result set, the repository should
        /// include the number here.  If the repository does not know the number of items in a result
        /// set, this parameter should not be set. The value in the parameter may not be accurate
        /// the next time the client retrieves the result set or the next page in the result set.
        /// </summary>
        [DataMember(Name = "numItems")]
        public string NumItems
        {
            get;
            set;
        }
    }
}
